import fetch from '@/utils/fetch';


// 说明：添加小区用水
// 接口：api/cb/flVillageWater
// 请求类型：Post
export function addFlVillageWater(obj) {
    return fetch({
        url: 'api/cb/flVillageWater',
        method: 'post',
        data: obj
    });
}

// 说明：删除小区用水
// 接口：api/cb/flVillageWater/{ids}
// 请求类型：Delete
export function deleteFlVillageWater(idArr) {
    return fetch({
        url: 'api/cb/flVillageWater/' + idArr,
        method: 'delete'
    });
}

// 说明：修改小区用水
// 接口：api/cb/flVillageWater/{id}
// 请求类型：Put
export function modifyFlVillageWater(id, obj) {
    return fetch({
        url: 'api/cb/flVillageWater/' + id,
        method: 'put',
        data: obj
    })
}

// 说明：小区用水分页查询(条件搜索)
// 接口：api/cb/flVillageWater/search/{page}/{size}
// 请求类型：Post
export function searchFlVillageWater(page, size, obj) {
    return fetch({
        url: 'api/cb/flVillageWater/search/'+ page +'/'+ size,
        method: 'post',
        data: obj
    });
}

// 说明：获取单个小区用水
// 接口：api/cb/flVillageWater/{id}
// 请求类型：get
export function getFlVillageWater(id) {
    return fetch({
        url: 'api/cb/flVillageWater/' + id,
        method: 'get'
    })
}

// 说明：小区用水导出Excel模板
// 接口：api/cb/flVillageWater/exprotExcelModel
// 请求类型：get
export function downTem() {
return fetch({
url: 'api/cb/flVillageWater/exprotExcelModel',
responseType: 'blob',
method: 'get'
})
}

// 说明：小区用水导出Excel数据
// 接口：api/cb/flVillageWater/exprotXls/{ids}
// 请求类型：post
export function exprotXls(ids, obj) {
return fetch({
url: 'api/cb/flVillageWater/exprotXls/' + ids,
responseType: 'blob',
method: 'post',
data: obj
})
}

// 说明：小区用水导入
// 接口：api/cb/flVillageWater/importXls
// 请求类型：post
export function importXls() {
return fetch({
url: 'api/cb/flVillageWater/importXls',
method: 'post'
})
}
